<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./lib/vue-2.4.0.js"></script>
    <link rel="stylesheet" href="./lib/bootstrap-3.3.7.css">
    <style>
        .v-enter,
        .v-leave-to{
            opacity: 0;
            transform: translateX(150px);
        }
        .v-enter-active,
        .v-leave-active{
            transition: all 1s ease;
        }

        .my-enter,
        .my-leave-to{
            opacity: 0;
            transform: translateY(150px);
        }
        .my-enter-active,
        .my-leave-active{
            transition: all 1s ease;
        }

    </style>
</head>
<body>
    <div id="app">
        <input type="button" value="toggle" @click="flage=!flage">
        <transition>
                <h3 v-if="flage">这是一个动画</h3>
        </transition>
        <hr/>
        <input type="button" value="toggle" @click="flage2=!flage2">
        <transition name="my">
                <h3 v-if="flage2">这是一个动画</h3>
        </transition>
    </div>
    <script>
        var vm=new Vue({
            el:"#app",
            data:{
                flage:false,
                flage2:false,

            },
            methods: {

                
            },
        })
    </script>
</body>
</html>